package com.hln.jingwushi.utils

import android.util.Log
import com.zgkxzx.modbus4And.requset.ModbusParam
import com.zgkxzx.modbus4And.requset.ModbusReq
import com.zgkxzx.modbus4And.requset.OnRequestBack

class MyModbusUtil {




    fun modbusInit(onRequestBack: OnRequestBack<String>) {
        ModbusReq.getInstance().setParam(
            ModbusParam()
                .setHost("192.168.1.232")
                .setPort(1502)
                .setEncapsulated(false)
                .setKeepAlive(true)
                .setTimeout(2000)
                .setRetries(0)
        )
            .init(onRequestBack)
    }
}